<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>详情页 - 文字链接</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/lib/layui-v2.6.8/css/layui.css" media="all">
    <link rel="stylesheet" href="/css/public.css" media="all">
</head>
<body>
<div class="layuimini-container" id="id_div">...</div>
<script src="/lib/layui-v2.6.8/layui.js" charset="utf-8"></script>
<script>
    layui.use(['layer'], function () {
        let $ = layui.jquery;

        let theRequest = null;
        layui.getRequest = function () {
            if (theRequest !== null) {
                return theRequest;
            }
            let request = {};
            let url = location.search;
            if (url.indexOf('?') != -1) {
                let arr = url.substr(1).split('&');
                for(let i = 0; i < arr.length; i++) {
                    let keys = arr[i].split('=');
                    request[keys[0]] = unescape(keys[1]);
                }
            }
            theRequest = request;
            return request;
        }

        let search = layui.getRequest();
        $.get('/index/itemInfo', {
            'id': search.id
        }, function (re) {
            if (re.code == 0) {
                let data = re.data.page;
                let html = '';
                for (let i in data) {
                    html += '<p><a target="_blank" href="' + data[i].image_link + '">' + data[i].image_inner + '</a></p>';
                }
                $('#id_div').html(html);
            } else {
                layer.msg('内容加载失败 !');
            }
        }, 'json');
    });
</script>

</body>
</html>